@extends('admin.main')

@section('title', '服务设置')

@section('content')
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox">
            <div class="ibox-title">
                <h5>服务配置</h5>
            </div>
            <div class="ibox-content">
                <form id="formSetting" method='post' onsubmit="return false">
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label>会员数</label>
                                <div class="input-group">
                                    <input name="people_number" value="{{$people_number}}" type="text" class="form-control" required="" onkeyup="value=value.replace(/[^\d]/g,'')">
                                    <span class="input-group-addon">人</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label>盒子购买价格：</label>
                                <div class="input-group">
                                    <input name="box_price" value="{{$box_price}}" type="text" class="form-control" required="" onkeyup="clearNoNum(this)">
                                    <span class="input-group-addon">&yen;</span>
                                </div>
                            </div>
                        </div>
                    </div>
                    <button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> 保存</button>
                </form>
            </div>
        </div>
    </div>
@endsection

@section('pagescript')
    <script>
        $("#formSetting").submit(function(){
            $.post('/admin/siteconfig/setting-config', $(this).serialize(), function() {
                artInfo('保存成功');
            }).fail(artInfo);
            return false;
        });

        $(function () {
            $("#side-menu li[rel='siteconfig']").addClass("active")
        });
    </script>
@endsection
